package com.shg.bean;

import java.io.Serializable;
import java.util.Date;

public class SoldBook implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	//书籍ID号(秘药使用)
	private String id;
	//书籍的价格
	private double price;
	//购买数量
	private int total=1;
	//用户评价时间
	private Date usertime;
	//用户的评价
	private String appraise;
	//书籍的父类
	private Book book;
	//该销售记录所属订单
	private OrderItem orderItem;
	//论坛
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public String getAppraise() {
		return appraise;
	}
	public void setAppraise(String appraise) {
		this.appraise = appraise;
	}
	public Book getBook() {
		return book;
	}
	public void setBook(Book book) {
		this.book = book;
	}
	public void setOrderid(String orderid) {
		
	}
	public Date getUsertime() {
		return usertime;
	}
	public void setUsertime(Date usertime) {
		this.usertime = usertime;
	}
	public OrderItem getOrderItem() {
		return orderItem;
	}
	public void setOrderItem(OrderItem orderItem) {
		this.orderItem = orderItem;
	}
	public int getTotal() {
		return total;
	}
	public void setTotal(int total) {
		this.total = total;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SoldBook other = (SoldBook) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
